//
//  MovieCollectionViewCell.m
//  UI_元旦豆瓣
//
//  Created by dllo on 16/1/7.
//  Copyright © 2016年 31付冬梅. All rights reserved.
//

#import "MovieCollectionViewCell.h"

@interface MovieCollectionViewCell ()


@end

@implementation MovieCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self creatCollectionViewCell];
    }
    return self;
}
- (void)creatCollectionViewCell {
    self.imageMovie = [[UIImageView alloc] init];
    [self.contentView addSubview:_imageMovie];
    
    self.labelMovie = [[UILabel alloc] init];
    [self.contentView addSubview:_labelMovie];
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    _imageMovie.frame = CGRectMake(0, 0, layoutAttributes.frame.size.width, layoutAttributes.frame.size.height - 30);
    _imageMovie.backgroundColor = [UIColor blueColor];
    _labelMovie.frame = CGRectMake(0, layoutAttributes.frame.size.height - 30, layoutAttributes.frame.size.width, 30);
    _labelMovie.backgroundColor = [UIColor purpleColor];
    _labelMovie.textColor = [UIColor whiteColor];
    _labelMovie.alpha = 0.5;
}



@end
